7d9dbd7bf49c764107a6acc850e8ca7bdf19ee86,s3tbx-c2rcc/src/main/java/org/esa/s3tbx/c2rcc/landsat8/C2rccLandsat8Operator.java,C2rccLandsat8Operator,prepareInputs,#,965
Before Change
try {
final String[] nnFilePaths;
final boolean loadFromResources = StringUtils.isNullOrEmpty(alternativeNNPath);
if (loadFromResources) {
nnFilePaths = c2rccNNResourcePaths;
} else {
nnFilePaths = NNUtils.getNNFilePaths(Paths.get(alternativeNNPath), alternativeNetDirNames);
}
algorithm = new C2rccLandsat8Algorithm(nnFilePaths, loadFromResources);
} catch (IOException e) {
After Change
}
try {
if (StringUtils.isNotNullAndNotEmpty(alternativeNNPath)) {
String[] nnFilePaths = NNUtils.getNNFilePaths(Paths.get(alternativeNNPath), alternativeNetDirNames);
algorithm = new C2rccLandsat8Algorithm(nnFilePaths, false);
} else {
String[] nnFilePaths = c2rccNetSetMap.get(netSet);
if(nnFilePaths == null) {
throw new OperatorException(String.format("Unknown set '%s' of neural nets specified.", netSet));
}
algorithm = new C2rccLandsat8Algorithm(nnFilePaths, true);
}
} catch (IOException e) {
throw new OperatorException(e);
}
algorithm.setTemperature(temperature);
algorithm.setSalinity(salinity);
algorithm.setThresh_absd_log_rtosa(thresholdRtosaOOS);
algorithm.setThresh_rwlogslope(thresholdAcReflecOos);
algorithm.setThresh_cloudTransD(thresholdCloudTDown865);
algorithm.setOutputRtosaGcAann(outputRtosaGcAann);
algorithm.setOutputRpath(outputRpath);
algorithm.setOutputTdown(outputTdown);
algorithm.setOutputTup(outputTup);
algorithm.setOutputRhow(outputAcReflectance);
algorithm.setOutputRhown(outputRhown);
algorithm.setOutputOos(outputOos);
algorithm.setOutputKd(outputKd);
algorithm.setOutputUncertainties(outputUncertainties);
algorithm.setDeriveRwFromPathAndTransmittance(deriveRwFromPathAndTransmittance);
timeCoding = C2rccCommons.getTimeCoding(sourceProduct);
initAtmosphericAuxdata();